<template>
<onekit-page>
<onekit-view onekit-class="container">
	<div is="onekit-template-head" :DATA="`${JSON.stringify({title:'share-button'})}`"></div>
	<onekit-view onekit-class="page-body">
		<onekit-view onekit-class="page-body-wrapper">
			<onekit-text onekit-class="page-body-title">轻触下方图标即可转发</onekit-text>
			<onekit-view onekit-class="page-body-line">
				<onekit-button onekit-class="button-share" open-type="share" id="share-button" @Tap="handleTapShareButton"></onekit-button>
				<onekit-label for="share-button">
					<onekit-image onekit-style="width: 27px; height: 27px" src="/image/share.png"></onekit-image>
				</onekit-label>
			</onekit-view>
		</onekit-view>
	</onekit-view>
	<div is="onekit-template-foot"></div>
</onekit-view>
</onekit-page></template>
<script>
/* eslint-disable */
import Vue from 'vue';
import onekit_template_0 from '../../../common/head.head.vue';Vue.component('onekit-template-head',onekit_template_0);
import onekit_template_1 from '../../../common/foot.foot.vue';Vue.component('onekit-template-foot',onekit_template_1);
const ONEKIT_JSON= {
  "navigationBarTitleText": "转发按钮",
  "usingComponents": {
    
  }
};
const ONEKIT_SJS = {
};
import wx from '../../../../weixin2vue/wx.js';
import Macro from '../../../../weixin2vue/Macro.js';
const {getApp,getCurrentPages} = Macro;
import Page from '../../../../weixin2vue/OnekitPage.js';
import Component from '../../../../weixin2vue/OnekitComponent.js';
export default Page(ONEKIT_JSON,[],ONEKIT_SJS,{
    "onShareAppMessage"(){
      return {
        "title":'转发按钮',
        "path":'packageAPI/pages/share-button/share-button'
};
    },
    "handleTapShareButton"(){
      if(!(typeof wx.canIUse == 'function') && (wx.canIUse('button.open-type.share')))
      {
        wx.showModal({
            "title":'当前版本不支持转发按钮',
            "content":'请升级至最新版本微信客户端',
            "showCancel":false
});
      };
    }
});

</script>
<style 
 lang="css">
.button-share {
  display: none ;
}
</style>